<template>
  <el-card class="box-card">
    <div class="row header">
      <span class="title">{{ title }}</span>
      <span class="time">{{ fabInfo.time }}</span>
    </div>
    <div class="content">
      <div class="row ">已测单元：{{ fabInfo.alreadyTestUnit }}</div>
      <div class="row">已测试量：{{ fabInfo.alreadyTest }}</div>
      <div class="row">待测试量：{{ fabInfo.awaitTest }}</div>
    </div>
    <div class="identification row">
      <div class="point-item">
        <div class="point" :style="{backgroundColor:testingColor}" />
        <span class="text">TESTING:{{ fabInfo.testing }}</span>
      </div>
      <div class="point-item">
        <div class="point" :style="{backgroundColor:holdColor}" />
        <span class="text">ON-HOLD:{{ fabInfo.onHold }}</span>
      </div>
      <div class="point-item">
        <div class="point" :style="{backgroundColor:idleColor}" />
        <span class="text">IDLE:{{ fabInfo.idle }}</span>
      </div>
    </div>
  </el-card>
</template>

<script>
export default {
  props: {
    fabInfo: {
      type: Object,
      required: true
    },
    title: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      testingColor: '#8EBE47',
      holdColor: '#DBD62F',
      idleColor: '#D5665C'
    }
  }
}
</script>

<style lang="scss"  scoped>
.box-card{
    width: 25%;
    margin: 10px 10px;
    height: 250px;
    // float: left;
}
.row{
  margin: 10px 10px;
  color: #9D9999;
}
.header{
    display: flex;
    justify-content: space-between;
    align-content: center;
    margin-bottom: 20px;
        align-items: center;
    .title{
        font-size: 20px;
        color: black;
        font-weight: 700;
    }
    .time{
        float: right;
        font-size: 12px;
    }
}
.content{
     margin-bottom: 10px;
}

.identification{
float: right;
  margin-bottom: 10px;
  .point-item{
    display: flex;
    margin-right: 10px;
    margin-bottom: 10px;
    .point{
        width: 10px;
        height: 10px;
        border-radius: 5px;
        margin-right: 5px;
        background-color: #409EFF;
    }
    .text{
        font-size: 12px;
    }
  }
}
</style>
